package com.rub.android.widget

import com.rub.android.dao.DataBaseDao
import com.rub.android.service.GitHubService
import com.rub.android.service.TagsService
import com.rub.android.service.UserService

/**
 * 应用程序逻辑控制管理类
 */
object InjectorUtil {


    fun getTagsViewModelFactory() = TagsViewModelFactory(
        TagsService.getInstance(
            DataBaseDao.getTagsDao(),
            RetrofitServiceApi.getInstance()
        )
    )


    fun getUserViewModelFactory() = UserViewModelFactory(
        UserService.getInstance(
            DataBaseDao.getUserDao(),
            RetrofitServiceApi.getInstance()
        )
    )

    fun getGithubViewModelFactory() = GitHubViewModelFactory(
        GitHubService.getInstance(
            DataBaseDao.GetGithubDao(),
            RetrofitServiceApi.getInstance()
        )
    )


}
